• Mac 下查看Python路径的方法:

    1.terminal :which python

    2.terminal: python - import sys - print sys.path

  • 设置Sublime Text的语法:

    View - syntax - python

  • 设置默认编译环境(默认版本2.7)

    Tools - Build System - Python

  • 添加Python3.5编译环境(如果需要)

    Tools - Butld System - New Build System在打开的文件中贴上以下代码:

    其中:cmd 后面为你的Python路径:

    1
    2
    3
    4
    5
    {
    "cmd": ["/Library/Frameworks/Python.framework/Versions/3.5/bin/python3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
    }

  • 测试并编译

    print ('hello world')

    然后 command + s保存

    command + B编译,下面有输出结果即为成功。